package cn.mcch.investigator.activity;

import android.content.Intent;

import cn.mcch.investigator.R;
import cn.mcch.investigator.model.impl.WelcomeModelImpl;
import cn.mcch.investigator.presenter.impl.WelcomePresenterImpl;
import cn.mcch.investigator.viewdelegate.impl.WelcomeViewDelegateImpl;

import android.os.Handler;

/**
 * Created by Administrator on 2016/12/17.
 */
public class WelcomeActivity extends BaseActivity<WelcomeViewDelegateImpl, WelcomeModelImpl, WelcomePresenterImpl> {

    private Runnable runnable = new Runnable() {
        @Override
        public void run() {
            WelcomeActivity.this.startActivity(new Intent(getApplicationContext(), LoginActivity.class));
            WelcomeActivity.this.finish();
        }
    };

    @Override
    public Class<WelcomePresenterImpl> getPresenterClass() {
        return WelcomePresenterImpl.class;
    }

    @Override
    public void createFirstView() {
        mPresenter.createFirstView(getApplicationContext(), R.layout.activity_welcome, this);
        // 3秒后跳转到登录界面
        mPresenter.gotoLogin(runnable);
    }

    @Override
    public void onBackPressed() {

    }
}
